<?php
/*
Template Name: Sitemap
*/
?>
<?php get_header(); ?>
<?php global $woo_options; ?>

		<?php get_sidebar('left'); ?>
		
		<div id="main">

			<div class="content-wrapper">
				<div class="content">
				
					<div class="content-inner post">
						
						<h2 class="title"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2>
						
						<?php woo_post_meta(); ?>
						
						<div class="entry">
	            
	            			<h3><?php _e('Pages', 'woothemes') ?></h3>
						
	            			<ul>
	           			    	<?php wp_list_pages('depth=0&sort_column=menu_order&title_li=' ); ?>		
	            			</ul>				
	    				
		        		    <h3><?php _e('Categories', 'woothemes') ?></h3>
						
		        		    <ul>
	    	    		        <?php wp_list_categories('title_li=&hierarchical=0&show_count=1') ?>	
	        			    </ul>
			    		    
			    		    <h3><?php _e('Posts per category',''); ?></h3>
			    		    
			    		    <?php
			    		
			    		        $cats = get_categories();
			    		        foreach ($cats as $cat) {
			    		
			    		        query_posts('cat='.$cat->cat_ID);
						
			    		    ?>
	        			
	        					<h4><?php echo $cat->cat_name; ?></h4>
								
			    		    	<ul>	
	    	    		    	    <?php while (have_posts()) : the_post(); ?>
	        			    	    <li style="font-weight:normal !important;"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a> - <?php _e('Comments', 'woothemes') ?> (<?php echo $post->comment_count ?>)</li>
	            				    <?php endwhile;  ?>
			    		    	</ul>
	    				
	    				    <?php } ?>
	    				
	    				</div><!-- /.entry -->
						
					</div><!-- /.post -->
					
				</div>
			</div>
		
		</div><!-- /#main -->
		
		<?php get_sidebar('right'); ?>
		
<?php get_footer(); ?>